package com.kedacom.freedomLabel.label.builder;

import com.kedacom.freedomLabel.label.ZebraLabel;

/**
 * @author licheng
 * @since 2019/11/29 13:02
 */
public class ZebraLabelBuilder<T> implements LabelBuilder<T> {

    private LabelParams<T> mLabelParams;

    @Override
    public ZebraLabelBuilder<T> width(int width) {
        this.mLabelParams.width = width;
        return this;
    }

    @Override
    public ZebraLabelBuilder<T> height(int height) {
        this.mLabelParams.height = height;
        return this;
    }

    @Override
    public ZebraLabelBuilder<T> count(int count) {
        this.mLabelParams.count = count;
        return this;
    }

    @Override
    public ZebraLabelBuilder<T> data(T data) {
        this.mLabelParams.data = data;
        return this;
    }

    @Override
    public ZebraLabel<T> build() {
        ZebraLabel<T> label = new ZebraLabel<>();
        label.bind(this.mLabelParams);
        return label;
    }
}